<?php
include("../design/header.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" src="../scripts/rule.js"></script>
<title>View Rules</title>
<link rel="stylesheet" type="text/css" href="../design/main.css" />
</head>

<?php
	require_once("../../business/RetrieveComboData.php");
	$comboObj = new RetrieveComboData();
	
	$param =  $_GET["param"];
	$optionTag="";
	
	if($param!=NULL){		
	
		$optionTag = $comboObj->getData("select rule_meta_data_id, description from ota_rulemetadata",$param);
	}else {

		$optionTag = $comboObj->getData("select rule_meta_data_id, description from ota_rulemetadata",0);
	}

?>
<body>

<table id="mainTable" width="100%" class="mainTableHeight1024x768" border="0" cellpadding="0" cellspacing="0">
<tr>
    <td width="50" valign="top" class="LeftBgColor">&nbsp;<?php include("../design/leftMenu.php"); ?>
	</td>
    <td valign="top">
    
<table id="table1" name="table1" align="center" cellpadding="1" cellspacing="1" border="0" >
	<form id="form1" name="form1" method="post" action="">
	<tr>
    	<td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
    </tr>
        <tr>
    	<td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
    </tr>
    <tr>
    	
   	  <td class="Labels" colspan="7"><h3>View Rules</h3></td>
    </tr>	
    
    <tr>
    	<td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        
    </tr>
    
    <tr>	
    	<td class="Labels" colspan="3">Select the Rule to View</td>
        <td colspan="2">
        <select id="combo_rule_meta" name="combo_rule_meta" class="InputComboList" onchange="loadValues('form1',this);">
        	<option >Select</option>
			<?php echo $optionTag; ?>
        </select>
        </td>
        <td >&nbsp;</td>
    </tr>
    <tr>
    	<td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
        
    </tr>

    <tr>
    	<td colspan="6">&nbsp;</td>        
    </tr>

	<tr>
	    <td class="TableHeader">Sr No.</td> 
	    <td class="TableHeader">Rule Description</td> 
    	<td class="TableHeader">Flag</td>                      
        <td class="TableHeader">Field</td>        
        <td class="TableHeader">Logic</td> 
        <td class="TableHeader">Rule Value</td>     
        <td class="TableHeader">Operation</td>    
            
    </tr>
      
    <?php

		
	require_once("../../business/RetrieveRules.php");
	
	$retrieveRule = new RetrieveRules();
	
	if($param!=NULL){
		echo $retrieveRule->getData("",$param);	
	} else{

		echo $retrieveRule->getData("rule_meta_data_id",0);
	}
	?>
	
	</form>
</table>
    </td>
 </tr> 
 <tr>
 	<td>&nbsp;</td>
 </tr>  
</table>

</body>
</html>
